<template>
  <div class="xmsy-page">
    <page-header :content="xmItem.xmmc" title="返回项目列表" @back="goBack"></page-header>
    <el-tabs v-model="tab" style="height: 200px;" tab-position="top">
      <el-tab-pane label="规则配置" name="gzpz">
        <gzgl v-if="tab==='gzpz'"/>
      </el-tab-pane>
      <el-tab-pane label="实体管理" name="stgl">
        <stgl v-if="tab==='stgl'"/>
      </el-tab-pane>
      <el-tab-pane label="模型实体关系管理（统一业务2.0）" name="mxstgxgl">
        <mxstgxgl v-if="tab==='mxstgxgl'"/>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import Gzgl from "@/components/Gzgl";
import Stgl from "@/components/Stgl";
import PageHeader from "@/components/PageHeader";
import Mxstgxgl from "@/components/Mxstgxgl";
import commonMixins from "@/mixins/commonMixins";

export default {
  name: "Xmsy",
  mixins: [commonMixins],
  components: { Gzgl, Stgl, PageHeader, Mxstgxgl },
  data () {
    return {
      tab: ''
    }
  },
  watch: {
    tab () {
      mySessionStorage.setItem("xmsy-tab", this.tab)
    }
  },
  mounted () {
    this.tab = mySessionStorage.getItem("xmsy-tab", "gzpz")
    this.$store.dispatch('initDesignData')
  },
  methods: {
    goBack () {
      this.$router.push("/")
    }
  }
}
</script>

<style lang="scss" scoped>
.xmsy-page {

  ::v-deep .panel-box {
    height: 100%;

    .inner-box {
      margin-top: 10px;
      height: calc(100% - 40px);
      display: flex;
      flex-direction: column;
      overflow: auto;

      .gzfl-list-box, .stdy-list-box {
        flex: 1;
        overflow: auto;
      }
    }

    //.list-box {
    //  height: calc(100% - 28px);
    //  overflow: auto;
    //}
  }

  ::v-deep .el-container {
    height: 100%;

    .el-aside {
      height: 100%;
    }
  }
}
</style>
